package com.fenghuajueli.idiomppp.entity;

import androidx.annotation.Nullable;

public class IdiomPinEntity {

    private int column;
    private int row;
    private int status;//0表示需要填充的位置  1表示固定好的不需要填充的位置   2表示手动选取文字来填充的
    private String word;
    private int index;
    private Boolean isFill = false;//是否已经手动填充，仅在status=0时有效
    private String fillText = "";//手动填充的词

    private Boolean isBottomFill = false;//区分两个数据适配器的使用，底部文字是否已经点击填充

    public IdiomPinEntity(int column, int row, int status, String word) {
        this.column = column;
        this.row = row;
        this.status = status;
        this.word = word;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public IdiomPinEntity() {

    }

    public int getColumn() {
        return column;
    }

    public void setColumn(int column) {
        this.column = column;
    }

    public int getRow() {
        return row;
    }

    public void setRow(int row) {
        this.row = row;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        IdiomPinEntity idiomPinEntity = (IdiomPinEntity) obj;
        if (idiomPinEntity.getRow() == row && idiomPinEntity.getColumn() == column) {
            return true;
        } else {
            return super.equals(obj);
        }
    }

    public Boolean getFill() {
        return isFill;
    }

    public void setFill(Boolean fill) {
        isFill = fill;
    }

    public String getFillText() {
        return fillText;
    }

    public void setFillText(String fillText) {
        this.fillText = fillText;
    }

    public Boolean getBottomFill() {
        return isBottomFill;
    }

    public void setBottomFill(Boolean bottomFill) {
        isBottomFill = bottomFill;
    }
}
